//
//  SaveResultManager.m
//  WeddingAppWY
//
//  Created by wy on 17/9/22.
//  Copyright © 2017年 wy. All rights reserved.
//

#import "SaveResultManager.h"

@implementation SaveResultManager
+ (instancetype)share
{
    static id instance = nil;
    
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        instance = [[SaveResultManager alloc] init];
    });
    
    return instance;
}
-(void)saveWX{
    NSString *netS = self.weixinPayResult;
    NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
    [userDefaults setObject:netS forKey:@"weixinPayResult"];
    [userDefaults synchronize];
    NSNotification * notice = [NSNotification notificationWithName:@"weixinPay" object:nil userInfo:@{@"weixinPayResult":netS}];
    //发送消息
    [[NSNotificationCenter defaultCenter]postNotification:notice];
}
-(void)saveWXShareResult{
    NSString *netS = self.weixinShareResult;
    NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
    [userDefaults setObject:netS forKey:@"weixinShareResult"];
    [userDefaults synchronize];
    NSNotification * notice = [NSNotification notificationWithName:@"weixinShare" object:nil userInfo:@{@"weixinShareResult":netS}];
    //发送消息
    [[NSNotificationCenter defaultCenter]postNotification:notice];
}
@end
